<%@page import="org.simple_blogging.BlogApp"%>
<%@page import="org.simple_blogging.BlogEntry"%>
<%@page import="java.util.List"%>

<html>
	<body>
		<div>
		<%
			BlogApp bApp = BlogApp.getInstance();
			List<BlogEntry> entries = bApp.getAllBlogEntries();
			for(BlogEntry entry : entries)
			{
				out.print("<b><u>");
				out.print(entry.getBlogTitle());
				out.print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
				out.print("</b><i>");
				out.print(entry.getDateSubmittedString());
				out.print("</i></u><br /><br /><p>");
				out.print(entry.getBlogText());
				out.print("</p><hr width=\"75%\">");
			}
		%>
		</div>
		<form method="POST" name="blog_entry" action="blog_preview">
			Title:
			<br />
			<input type="text" name="blog_title"></input>
			<br />
			<br />
			<textarea name="blog_text" rows=20 cols=50></textarea>
			<br />
			<br />
			<input type="submit" value="Post"></input>
		</form>
	</body>
</html>